package com.ask.forMe.controller.business;

import com.ask.forMe.langchain4j.store.MongoRedisChatMemoryStore;
import com.ask.forMe.model.entity.Result;
import com.ask.forMe.service.UserService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user")
@Tag(name = "用户接口")
public class UserController {

    @Autowired
    private MongoRedisChatMemoryStore chatMemoryStore;
    @Autowired
    private UserService userService;

    @DeleteMapping("/{memoryId}")
    @Operation(summary = "根据会话id删除数据")
    public Result deleteMemoryById(@PathVariable String memoryId) {
        chatMemoryStore.deleteMessages(memoryId);
        return Result.success("数据已删除！");
    }


}
